﻿Imports System.Data.SqlClient

Public Class Home
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        If Not Page.IsPostBack Then

            PreencheDados()
        End If

    End Sub

    Private Sub PreencheDados()

        Dim BL As New BusinessLogic.BLApostas.BLApostas
        Dim dr As New Dictionary(Of String, Object)
        Dim IDCampeonato As Integer = Nothing
        Dim Descricao As String = String.Empty

        dr = BL.ObterUtilizadorCampeonatoActivo(CInt(Session("IDUtilizador").ToString))

        If dr.Count > 0 Then

            IDCampeonato = dr("IDCampeonato")
            Descricao = dr("Nome")

            lblIDCampeonato.Text = IDCampeonato
            lblDescricao.Text = Descricao

        End If

    End Sub

End Class